﻿/*
function InvalidDate(obj) {
    x = document.getElementById(obj);
    if (x.value == "") {
        $('#<%=txtErrorValue.ClientID %>').show();
        return false;
    }
    else
        $('#<%=txtErrorValue.ClientID %>').hide();
}
*/
function DownloadFile(obj) {
    window.location.href = obj;
    return false;
}
/*
function StopKeyPressingIfMoreThanAValue(obj) {
    textbox = document.getElementById('<%=txtMemoDescription.ClientID %>');
    if (textbox.value.length > 99)
        return false;
}
*/
function DialogDisplay(LinkPage, TitleOfThePage) {
    var path = LinkPage;
    var options = {
        url: path,
        tite: TitleOfThePage,
        allowMaximize: true,
        showClose: true,
        width: 900,
        dialogReturnValueCallback: ReturnExecutionValue,
        height: 900

    };
    SP.UI.ModalDialog.showModalDialog(options);
    return false;
}
function DialogDisplay(LinkPage, TitleOfThePage,wh,ht) {
    var path = LinkPage;
    var options = {
        url: path,
        tite: TitleOfThePage,
        allowMaximize: true,
        showClose: true,
        width: wh,
        dialogReturnValueCallback: ReturnExecutionValue,
        height: ht

    };
    SP.UI.ModalDialog.showModalDialog(options);
    return false;
}
function ReturnExecutionValue(result, value) {
    if (result == SP.UI.DialogResult.OK) {
        history.go(0);
    }
}
/*
function liv(obj) {
    var path = "/_layouts/TrafficTech/EditPage.aspx?id=" + obj;
    var options = {
        url: path,
        tite: "Editing",
        allowMaximize: true,
        showClose: true,
        width: 450,
        height: 350
    };
    SP.UI.ModalDialog.showModalDialog(options);
    return false;
}

function liv() {

    var options = {
        url: path,
        tite: "Editing",
        allowMaximize: true,
        showClose: true,
        width: 600,
        height: 300
    };
    SP.UI.ModalDialog.showModalDialog(options);
    return false;
}
*/